There are various types of non-linear systems employed in contemporary electronics. For example, picture display devices such as video cameras or television monitors used in image processing systems have transfer functions which are expressed by the exponential function of gamma (xcex3) and are therefore non-linear.
FIG. 1 is a graph depicting the non-linearity of a typical picture display device. The horizontal axis denotes the intensity of an image input (x) to the picture display device, and the vertical axis denotes the intensity of an image output (y) from the picture display device. The picture display device is characterized by a non-linearity which deteriorates visual sensitivity by displaying a dark portion of an input image signal (x) as darker (i.e. the intensity is lowered for low values of (x)) and a bright portion as brighter (i.e. the intensity is raised for large values of (x)) as shown in curve (a). Therefore, to ensure a linear final image output (y) as shown in curve (b), the input image signal (x) is first gamma-corrected by applying the exponential function x1/xcex3 to the input signal, as shown in curve (c) and by providing the gamma-corrected signal to the picture display device. This technique is referred to in the art as non-linear correction.
Conventional non-linearity correcting methods are now described, with reference to the gamma correction application. In the case of an ideal image processing system, the gamma value is determined by the type of picture display device, for example by the fluorescent material characteristics of the cathode ray tube employed in the device. However, in an actual image processing system, it is necessary to transform the gamma value so that it accurately reflects not only the cathode ray tube, but also additional components of the system. The transformation can be implemented by analog or digital means.
In the conventional technique of gamma (xcex3) correction by the analog transformation method, the gamma-corrected curve (c) of FIG. 1 is partitioned into several sections, and an amplifier is configured for varying the gain in each section. The gain of each amplifier is adjusted by a piecewise linear approximation method. However, in the analog method, external adjustment ports are required in order to vary the gain. Also, there are inherent limitations in the degree to which the slope of the gamma-corrected curve can be varied.
In a digital image processing system, digital correction is preferred. However, application of piecewise linear approximation to a digital input signal is hardware-intensive, as a multiplier, a divider, an adder, and a subtracter are required. Therefore, a digital look-up table is commonly employed. However, in the look-up table method, it is impossible to implement an arbitrarily- varied gamma-corrected curve such as curve (c) of FIG. 1. Though several varied gamma-corrected curves can be preset and stored in order to address this problem, this solution is again hardware-intensive, as a large memory space is needed.
A conventional technique for addressing this problem is described in Korean Patent laid-open No. P96-036536 under the title xe2x80x9cA digital non-linear gain controller for an arbitrarily variable image signalxe2x80x9d, by the applicant, dated Oct. 28, 1996, incorporated herein by reference. For addressing the limitations of the digital look-up table method described above, the x axis of the graph in which the gamma-corrected curve is plotted and divided into sections expressed by powers of 2. The first order function of the gamma-corrected curve is generated using a piecewise linear approximation in each section. A corrected signal (y) is obtained by applying the image signal (x) to the first order function. The gamma-corrected curve is freely transformed by varying the first order function by adjusting various predetermined parameters Y0-Y5 or Y0xe2x80x2-Y5xe2x80x2 corresponding to the starting and ending points of the respective sections.
FIG. 2 is a graph depicting the problem of the conventional non-linear gain controlling method. The horizontal axis denotes the intensity of a corrected signal (yxe2x80x2), representing a gamma-corrected image input and is provided to the picture display device. The vertical axis denotes the intensity of an image (y) output from the picture display device.
Referring to FIG. 2, when an ideal gamma correction is performed, the image (y) output from the picture display device is the same as the original image input (x), such that the transfer function of the picture display device is represented by an ideal curve 10 whose slope is xe2x80x981xe2x80x99, as a result of gamma correction. However, in the conventional non-linearity gain controlling method, where gamma correction is performed using piecewise linear approximation, in the output of the cathode ray tube of the picture display device there is a deviation from the ideal curve 10, for function values between the starting and ending points, e.g. points 16, 18 of the respective sections (referred to as xe2x80x9cinflection pointsxe2x80x9d), as shown in curve 12 of FIG. 2. In particular, since errors near the middle portion of each section 15, 17 are larger and more numerous than those near the inflection points (14 and 16, 16 and 18, or 18 and 20), the image of parts having errors near the inflection points is displayed more outstandingly relative to the image of parts having errors near the middle portion of each section.
In order to address this problem, it is possible to reduce the magnitude of the error between the actual curve 12 and the ideal curve 10 by increasing the number of sections. However, as the number of sections is increased, so is the number of function values corresponding to the respective sections of the gamma-corrected curve, leading again to a more inconvenient and more hardware-intensive solution.
The present invention relates to a non-linear system having a non-linear transfer function, and more particularly, to an apparatus and method for digitally correcting the non-linearity of a non-linear system, using a piecewise linear approximation technique.
To address the above problems, it is an object of the present invention to provide a method and apparatus for digital correction of non-linearity in a system transfer function using a piecewise linear approximation method adapted for minimizing and uniformly correcting errors, while minimizing the size of associated hardware and the number of function values.
Accordingly, the present invention is directed to a method for processing an n-bit wide digital input signal x to generate a corrected output signal y for transmission to a system for compensating for system non-linearity. The range of possible digital values of the digital input signal is divided into a plurality of sections, the range of each section being represented by 2k-2kxe2x88x921 where p less than kxe2x89xa6n and p is an integer greater than or equal to 1. Next, it is determined whether the value of the input signal is less than 2k+g and greater than or equal to 2kxe2x88x92g where g is a variable less than 2kxe2x88x921, and if so, a corresponding corrected output signal yxe2x80x2 is obtained according to the following relationship:       y    xe2x80x2    =                              {                                    Y              ⁢                              (                                  k                  +                  1                                )                                      -                          Y              ⁢                              (                                  k                  -                  1                                )                                      +                          Y              ⁢                              (                k                )                                      -                          Y              ⁢                              (                                  k                  -                  1                                )                                              }                          4          ⁢                      {                                          X                ⁢                                  (                  k                  )                                            -                              X                ⁢                                  (                                      k                    -                    1                                    )                                                      }                              ·              {                  x          -                      X            ⁢                          (              k              )                                +          g                }              +          Y      ⁢              (        k        )              -          g      ·                                    Y            ⁢                          (              k              )                                -                      Y            ⁢                          (                              k                -                1                            )                                                            X            ⁢                          (              k              )                                -                      X            ⁢                          (                              k                -                1                            )                                          
where X(k)=2k and X(kxe2x88x921)=2kxe2x88x921 respectively, and where Y(k+1), Y(k), and Y(kxe2x88x921) represent function values corresponding to input values 2kxe2x88x921, 2k, and 2kxe2x88x921, respectively. If the above is not true, it is determined whether the value of the input signal is less than 2kxe2x88x92g and greater than or equal to 2kxe2x88x921+gxe2x80x2, where gxe2x80x2 is less than 2kxe2x88x922, and if so, a corresponding corrected output signal yxe2x80x2 is obtained according to the following relationship:       y    xe2x80x2    =                                          Y            ⁢                          (              k              )                                -                      Y            ⁢                          (                              k                -                1                            )                                                            X            ⁢                          (              k              )                                -                      X            ⁢                          (                              k                -                1                            )                                          ⁢              {                  x          -                      X            ⁢                          (              k              )                                      }              +                  Y        ⁢                  (          k          )                    .      
In a preferred embodiment, if the value of the input signal is less than 2kxe2x88x92g and greater than or equal to 2kxe2x88x921+gxe2x80x2, then the corrected signal yxe2x80x2 may alternatively be obtained according to the following relationship:       y    xe2x80x2    =                                          Y            ⁢                          (              k              )                                -                      Y            ⁢                          (                              k                -                1                            )                                                            X            ⁢                          (              k              )                                -                      X            ⁢                          (                              k                -                1                            )                                          ⁢              {                  x          -                      X            ⁢                          (                              k                -                1                            )                                      }              +                  Y        ⁢                  (                      k            -            1                    )                    .      
In a preferred embodiment g preferably represents:   g  =                    2        k            -              2                  k          -          1                      4  
and gxe2x80x2 preferably represents:       g    xe2x80x2    =                    2                  k          -          1                    -              2                  k          -          2                      4  